package com.jackeys.piaems.dao.mapper;

import com.jackeys.piaems.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @InterfaceName: UserMapper
 * @Description: 用户映射接口
 * @Author: Jackeys
 * @Date: 2021-06-08 17:38
 * @Version: 1.0
 */

@Mapper
public interface UserMapper {

    //查询用户信息
    List<User> getUserInfByAccount(@Param("account") String account);

    //登陆
    List<User> login(@Param("account") String account, @Param("password") String password);

    //注册用户信息
    Boolean register(@Param("account") String account, @Param("password") String password, @Param("email") String email);

    //修改用户密码
    Boolean forget(@Param("email") String email, @Param("password") String password);

    //查询邮箱是否被注册过
    Integer isEmailConflict(@Param("email") String email);

    //修改用户信息
    Boolean modifyUserInf(@Param("account")String account, @Param("name")String name, @Param("birthday")Date birthday,@Param("sex")String sex,@Param("age") Integer age,@Param("phone")String phone,@Param("sign")String sign,@Param("headPortrait")String headPortrait);

    //查询用户头像
    String selectHeadPortraitByAccount(@Param("account")String account);

}
